using System;
using Microsoft.SPOT;

namespace LBNHelpers
{
	public static class Maths
	{
		public static float Min(float a, float b)
		{
			return (a < b) ? a : b;
		}

		public static float Max(float a, float b)
		{
			return (a > b) ? a : b;
		}

		public static float Clip(float a, float min, float max)
		{
			if (a < min) return min;
			if (a > max) return max;
			return a;
		}
	}
}
